
import {createRouter,createWebHistory} from 'vue-router'
// 路由规则
const routes=[
    {
        path:"/",
        title:"首页",
        component: ()=> import("../views/welcome.vue")
    },
    {
        path:"/dict",
        title:"字典管理",
        component: ()=> import('../views/sys/dict/list.vue')
    },
    {
        path:"/log",
        title:"操作日志管理",
        component: ()=> import('../views/sys/log/list.vue')
    },
    {
        path:"/item-cat",
        title:"物料产品分类",
        component: ()=> import('../views/md/item-cat/list.vue')
    },
    {
        path:"/item",
        title:"物料产品管理",
        component: ()=> import('../views/md/item/list.vue')
    },
    {
        path:"/unit",
        title:"计量单位",
        component: ()=> import('../views/md/unit/list.vue')
    },
    {
        path:"/client",
        title:"客户管理",
        component: ()=> import('../views/md/client/list.vue')
    },
    {
        path:"/vendor",
        title:"供应商管理",
        component: ()=> import('../views/md/vendor/list.vue')
    },
    {
        path:"/workshop",
        title:"车间设置",
        component: ()=> import('../views/md/workshop/list.vue')
    },
    {
        path:"/workstation",
        title:"工作站",
        component: ()=> import('../views/md/workstation/list.vue')
    },
    {
        path:"/defect",
        title:"常见缺陷",
        component: ()=> import('../views/qc/defect.vue')
    },
    {
        path:"/index",
        title:"检测项管理",
        component: ()=> import('../views/qc/index.vue')
    },
    ,
    {
        path:"/workorder",
        title:"生产工单",
        component: ()=> import('../views/pro/workTicket/list.vue')
    },
    {
        path:"/process",
        title:"工序设置",
        component: ()=> import('../views/pro/process/list.vue')
    },
    {
        path:"/route",
        title:"工艺流程",
        component: ()=> import('../views/pro/route/list.vue')
    },
    {
        path:"/calTeam",
        title:"班组管理",
        component: ()=> import('../views/cal/team/list.vue')
    }
]
// 创建路由对象
const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: createWebHistory(),
    routes, // `routes: routes` 的缩写
});
// 暴漏router对象
export default router;